package com.buchong.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.buchong.pojo.Order_item;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Order_Item_Mapper extends BaseMapper<Order_item> {

    @Select("select id,orderId,bookId,num,oldPrice,newPrice,commentId from order_item where orderId=#{arg0} and commentId=${arg1}")
    List<Order_item> finAll(Integer id,Integer cid);
    @Insert("insert into order_item values(default,#{orderId},#{bookId},#{num},#{oldPrice},#{newPrice},#{commentId})")
    int and(Order_item order_item);

}
